package com.petdog.infrastructure.mapper;

import com.petdog.infrastructure.entity.AdminOperationLog;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 管理员操作日志Mapper接口
 */
@Mapper
public interface AdminOperationLogMapper {
    
    /**
     * 插入操作日志
     */
    int insert(AdminOperationLog log);
    
    /**
     * 查询操作日志列表
     */
    List<AdminOperationLog> selectLogList(
            @Param("offset") int offset,
            @Param("pageSize") int pageSize,
            @Param("adminId") Long adminId,
            @Param("operationType") String operationType,
            @Param("operationModule") String operationModule,
            @Param("startTime") java.time.LocalDateTime startTime,
            @Param("endTime") java.time.LocalDateTime endTime
    );
    
    /**
     * 查询操作日志总数
     */
    long countLogList(
            @Param("adminId") Long adminId,
            @Param("operationType") String operationType,
            @Param("operationModule") String operationModule,
            @Param("startTime") java.time.LocalDateTime startTime,
            @Param("endTime") java.time.LocalDateTime endTime
    );
}
